﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel.Dependencies"
                    xmlns:dCtrl="clr-namespace:Tum.PDE.ToolFramework.Modeling.Visualization.Controls.Dependencies">
    <DataTemplate DataType="{x:Type vm:SpecificDependenciesItemViewModel}">
        <Grid>
            <Border BorderThickness="1" BorderBrush="Silver" Width="170" Height="70" CornerRadius="8" Background="White">
                <TextBlock Margin="5" x:Name="textBlock" Grid.Column="1" TextTrimming="CharacterEllipsis" 
                           Text="{Binding Path=DomainElementIndexedName, Mode=OneWay}"
                           HorizontalAlignment="Center" VerticalAlignment="Center">
                        <TextBlock.ToolTip>
                            <TextBlock Text="{Binding Path=DomainElementFullName, Mode=OneTime}"/>
                        </TextBlock.ToolTip>
                    </TextBlock>
            </Border>
        </Grid>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=DomainElementHasName}" Value="False">
                <Setter TargetName="textBlock" Property="Text" Value="{Binding Path=DomainElementIndexedFullName, Mode=OneTime}"/>
            </DataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>
</ResourceDictionary>